home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-09 | 1.8 KB | 107 lines | [TEXT/CWIE] |
- /*
- File: LSecondaryGroupBox.cp
-
- Contains: Contains: Apple Grayscale Appearance-savvy
- secondary group box pane.
-
- Copyright: ©1996 Chris K. Thomas. All Rights Reserved.
-
- Version: 1.0
- */
-
- #include "LSecondaryGroupBox.h"
- #include "AGAColors.h"
-
-
- //
- // • instance lifetime —————————————————————————————————————————————————————————————————————————
- //
-
- LSecondaryGroupBox*
- LSecondaryGroupBox::CreateSecondaryGroupBoxStream(LStream *inStream)
- {
- return new LSecondaryGroupBox(inStream);
- }
-
-
- LSecondaryGroupBox::LSecondaryGroupBox()
- {
-
- }
-
-
- LSecondaryGroupBox::LSecondaryGroupBox( const LGroupBox &inGroupBox)
- :LGroupBox(inGroupBox)
- {
-
- }
-
-
- LSecondaryGroupBox::LSecondaryGroupBox( const SPaneInfo &inPaneInfo, Str255 inString, ResIDT inTextTraitsID)
- :LGroupBox(inPaneInfo, inString, inTextTraitsID)
- {
-
- }
-
-
- LSecondaryGroupBox::LSecondaryGroupBox( LStream *inStream)
- :LGroupBox(inStream)
- {
-
- }
-
- //
- // • imaging ———————————————————————————————————————————————————————————————————————————————————
- //
-
- void
- LSecondaryGroupBox::DrawText(
- const Rect &inRect)
- {
- if(!IsEnabled())
- ::RGBForeColor(&kColor7);
- else
- ::RGBForeColor(&kBlackColor);
-
- LGroupBox::DrawText(inRect);
- }
-
-
- void
- LSecondaryGroupBox::DrawBorder( const Rect &inRect)
- {
- const RGBColor *darkColor;
- const RGBColor *lightColor;
- Rect r = inRect;
-
- if(IsEnabled())
- {
- darkColor = &kColor7;
- lightColor = &kWhiteColor;
- }
- else
- {
- darkColor = &kColor4;
- lightColor = &kColor1;
- }
-
- //
- // draw dark bits
- //
- ::RGBForeColor(darkColor);
-
- MoveTo(inRect.left, inRect.bottom - 1); // left
- LineTo(inRect.left, inRect.top);
- LineTo(inRect.right - 1, inRect.top); // top
-
- //
- // draw light bits
- //
- ::RGBForeColor(lightColor);
-
- MoveTo(inRect.right, inRect.top + 1); // right
- LineTo(inRect.right, inRect.bottom);
- LineTo(inRect.left + 1, inRect.bottom); // bottom
- }
-
-